<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"      
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:cc="http://java.sun.com/jsf/composite"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:ic="http://ivyteam.ch/jsf/component"
      xmlns:p="http://primefaces.org/ui"
      xmlns:pe="http://primefaces.org/ui/extensions"
      xmlns:pm="http://primefaces.org/mobile">
      
<cc:interface componentType="IvyComponent">
</cc:interface>

<cc:implementation>
        <h:form id="historyForm">        	
            <p:dataTable value="#{data.histories}" var="entity">
            	<p:column>
            		<f:facet name="header">Timestamp</f:facet>
            		<h:outputText value="#{entity.dateChange}"/>
            	</p:column>
            	<p:column>
            		<f:facet name="header">User</f:facet>
            		<h:outputText value="#{entity.userChange}"/>
            	</p:column>
            	<p:column>
            		<f:facet name="header">Action</f:facet>
            		<h:outputText value="#{entity.actionChange.changeName}"/>
            	</p:column>
            	<p:column>
            		<f:facet name="header">From</f:facet>
            		<h:outputText value="#{entity.fromChange}"/>
            	</p:column>
            	<p:column>
            		<f:facet name="header">To</f:facet>
            		<h:outputText value="#{entity.toChange}"/>
            	</p:column>
            </p:dataTable>  
            <pe:remoteCommand name="loadHistory" actionListener="#{logic.refresh}">
            	<pe:assignableParam assignTo="#{data.taskId}" name="id"></pe:assignableParam>
            </pe:remoteCommand>          
        </h:form>    
</cc:implementation>
</html>